package com.handu.luna.core.domain.system;

import com.handu.luna.core.domain.BaseRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by wangzailiang on 2014/7/15.
 */
public interface RegionRepository extends BaseRepository<Region>{

    @Query("select u from Region u where u.parentId = ?1")
    public List<Region> findRegionListByParentId(long parentId);

    @Query("select u from Region u where u.level = ?1")
    public List<Region> findRegionListByLevel(long level);
}
